package com.udima.reglocation.helpers;

import java.util.ArrayList;
import java.util.Collection;

import org.json.JSONArray;
import org.json.JSONException;

public class JSONHelper {

	public JSONHelper(){}
	
	/**
	 * 
	 * @param jArray
	 * @return
	 * @throws JSONException 
	 */
	public Collection<String> JSONArrayToStringCollection(JSONArray jArray) throws JSONException {
		Collection<String> res = new ArrayList<String>();
		for(int i=0; i<jArray.length(); i++) {
			res.add(jArray.getString(i));
		}
		return res;
	}
}
